home *** CD-ROM | disk | FTP | other *** search
- ELF_FLAG(3E) Last changed: 10-13-98
-
-
- NNAAMMEE
- eellff__ffllaaggddaattaa, eellff__ffllaaggeehhddrr, eellff__ffllaaggeellff, eellff__ffllaaggpphhddrr, eellff__ffllaaggssccnn,
- eellff__ffllaaggsshhddrr - Manipulates flags
-
- SSYYNNOOPPSSIISS
- cccc [_f_l_a_g ...] _f_i_l_e ... --lleellff [_l_i_b_r_a_r_y ...]
-
- ##iinncclluuddee <<lliibbeellff..hh>>
-
- uunnssiiggnneedd eellff__ffllaaggddaattaa((EEllff__DDaattaa **ddaattaa,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
-
- uunnssiiggnneedd eellff__ffllaaggeehhddrr((EEllff **eellff,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
-
- uunnssiiggnneedd eellff__ffllaaggeellff((EEllff **eellff,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
-
- uunnssiiggnneedd eellff__ffllaaggpphhddrr((EEllff **eellff,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
-
- uunnssiiggnneedd eellff__ffllaaggssccnn((EEllff__SSccnn **ssccnn,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
-
- uunnssiiggnneedd eellff__ffllaaggsshhddrr((EEllff__SSccnn **ssccnn,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- These functions manipulate the flags associated with various
- structures of an ELF file. Given an ELF descriptor (eellff), a data
- descriptor (ddaattaa), or a section descriptor (ssccnn), the functions may
- set or clear the associated status bits, returning the updated bits.
- A null descriptor is allowed, to simplify error handling; all
- functions return zero for this degenerate case.
-
- ccmmdd may have the following values:
-
- EELLFF__CC__CCLLRR The functions clear the bits that are asserted in
- ffllaaggss. Only the non-zero bits in ffllaaggss are cleared;
- zero bits do not change the status of the
- descriptor.
-
- EELLFF__CC__SSEETT The functions set the bits that are asserted in
- ffllaaggss. Only the non-zero bits in ffllaaggss are set;
- zero bits do not change the status of the
- descriptor.
-
- The following are descriptions of the defined ffllaaggss bits:
-
- EELLFF__FF__DDIIRRTTYY When the program intends to write an ELF file, this
- flag asserts the associated information that must be
- written to the file. For example, if a program is
- to update the ELF header of an existing file, it
- would call eellff__ffllaaggeehhddrr with this bit set in ffllaaggss
- and ccmmdd equal to EELLFF__CC__SSEETT. A later call to
- eellff__uuppddaattee would write the marked header to the
- file.
-
- EELLFF__FF__LLAAYYOOUUTT Usually, the library decides how to arrange an
- output file. That is, it automatically decides
- where to place sections, how to align them in the
- file, etc. If this bit is set for an ELF
- descriptor, the program determines all file
- positions. This bit is meaningful only for
- eellff__ffllaaggeellff and applies to the entire file
- associated with the descriptor.
-
- When a flag bit is set for an item, it affects all the subitems as
- well. For example, if the program sets the EELLFF__FF__DDIIRRTTYY bit with
- eellff__ffllaaggeellff, the entire logical file is ``dirty.''
-
- EEXXAAMMPPLLEESS
- The following fragment shows how one might mark the ELF header to be
- written to the output file.
-
- ehdr = elf32_getehdr(elf);
- /* dirty ehdr ... */
- elf_flagehdr(elf, ELF_C_SET, ELF_F_DIRTY);
-
- SSEEEE AALLSSOO
- eellff(3E), eellff__eenndd(3E), eellff__ggeettddaattaa(3E), eellff__ggeetteehhddrr(3E), eellff__uuppddaattee(3E)
-
- This man page is available only online.
-
-